package cn.gov.application;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class FeignServerApplication {

	@Autowired
	TestService service;
	
	public static void main(String[] args) {
		SpringApplication.run(FeignServerApplication.class, args);
	}
	
	@RequestMapping(value = "/test",method = RequestMethod.GET)
	public String test(@RequestParam String name){
		return service.test(name);
	}
	
}
